package com.kupurui.asteacher.adapter;

import android.content.Context;

import com.android.frame.adapter.CommonAdapter;
import com.android.frame.adapter.ViewHolder;
import com.kupurui.asteacher.R;
import com.kupurui.asteacher.bean.HomeworkCompletionBean;

import java.util.List;

/**
 * Created by Administrator on 2017/7/18.
 */

public class HomeworkCompletionAdapter extends CommonAdapter<HomeworkCompletionBean> {
    public HomeworkCompletionAdapter(Context context, List<HomeworkCompletionBean> mList, int itemLayoutId) {
        super(context, mList, itemLayoutId);
    }

    @Override
    public void convert(ViewHolder holder, HomeworkCompletionBean item, int positon) {
        holder.setTextViewText(R.id.tv_title,item.getTitle());
        holder.setTextViewText(R.id.tv_time,item.getTime());
        holder.setTextViewText(R.id.tv_degree,item.getDegree()+"%");
        holder.setTextViewText(R.id.tv_correct,item.getCorrect()+"%");
    }
}
